
create sequence "AuthorityMaster_AuthorityMasterId_seq";


CREATE TABLE "AuthorityMaster"
(
    "AuthorityMasterId" int NOT NULL DEFAULT nextval('"AuthorityMaster_AuthorityMasterId_seq"'::regclass),
    "Authority" character varying(255),
    "Active" boolean DEFAULT true,
    "CreatedBy" int NOT NULL,
    "CreatedDate" timestamp without time zone NOT NULL,
    "ModifiedBy" int,
    "ModifiedDate" timestamp without time zone,
    CONSTRAINT "AuthorityMaster_pkey" PRIMARY KEY ("AuthorityMasterId"),
    CONSTRAINT "FK_AuthorityMaster_CreatedBy" FOREIGN KEY ("CreatedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION,
    CONSTRAINT "FK_AuthorityMaster_ModifiedBy" FOREIGN KEY ("ModifiedBy")
        REFERENCES public."Account" ("AccountId") MATCH SIMPLE
        ON UPDATE NO ACTION
        ON DELETE NO ACTION
);


----------------------------------------------------------------------------------------------------------------------
insert into "LogType" values(84, 'AuthorityMaster', true);
